package com.foreveredu.erlms.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/*
 * @author hushigang 2012/4/8
 * 领域模型类——成绩
 * 学生成绩应从cjk.dbf中提取"zzbscj"最终笔试成绩/"zzsjcj"最终上机成绩/"zcj"总成绩等级/"zsbh"证书编号
 */
@Entity
@Table(name = "grade")
public class Grade implements Serializable {

	private static final long serialVersionUID = 1L;
	private int id;// 编号
	private Examinee examinee;// 考生
	private double zzsjcj;// 最终上机成绩
	private double zzbscj;// 最终笔试成绩
	private double zcj;// 总成绩等级，0代表不合格，1代表合格，2代表良好，3代表优秀
	private String zsbh;// 证书编号，总成绩合格，才有证书编号

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@OneToOne
	@JoinColumn(name = "examinee_id")
	public Examinee getExaminee() {
		return examinee;
	}

	public void setExaminee(Examinee examinee) {
		this.examinee = examinee;
	}

	@Column
	public double getZzbscj() {
		return zzbscj;
	}

	public void setZzbscj(double zzbscj) {
		this.zzbscj = zzbscj;
	}

	@Column
	public double getZzsjcj() {
		return zzsjcj;
	}

	public void setZzsjcj(double zzsjcj) {
		this.zzsjcj = zzsjcj;
	}

	@Column
	public double getZcj() {
		return zcj;
	}

	public void setZcj(double zcj) {
		this.zcj = zcj;
	}
	
	@Column
	public String getZsbh() {
		return zsbh;
	}

	public void setZsbh(String zsbh) {
		this.zsbh = zsbh;
	}

}
